<template>
	<div class="card col-md-8">
		<div class="card-body">
			<h5 class="card-title">个人资料</h5>
			<div class="card-text">
				<div>
					<span>用户名:</span>
					<span>{{user.name}}</span>
				</div>
				<div>
					<span>邮箱:</span>
					<span>{{user.email}}</span>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import { mapState } from "vuex";
export default {
	created() {
		this.$store.dispatch("setAuthUser");
	},
	computed: {
		...mapState({
			user: state => state.AuthUser
		})
	}
};
</script>
